<template>
	<view>
		<uni-badge text="1"></uni-badge>
		<uni-badge text="2" type="success"></uni-badge>
		<uni-badge text="3" type="primary" :inverted="true"></uni-badge>
	</view>
	<view class="">
		{{store.token}}
	</view>
	<button @click="store.setToken(Math.random())">set</button>
</template>

<script setup>
	import {
		onMounted
	} from 'vue';
	import {
		useUserStore
	} from '../../stores/user';
	// import request from '@/utils/request.js'
	const store = useUserStore()

	// 测试请求
	const getSwiper = async () => {
		const res = await uni.ajax.get('/home/swiperdata')
		console.log('结果：', res)
	}

	onMounted(() => {
		getSwiper()
	})
</script>

<style>

</style>